/*CopyRight 2015 By YXKJ Co., Ltd. All Rights Reserved.*/
package com.yx.ehis;

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.yx.system.SystemContext;

/**
 * @author zgq
 */
public class Activator implements BundleActivator {
	@Override
	public void start(BundleContext context) throws Exception {
		System.out.println("e-his-core start...");
		ApplicationContext applicationContext = new ClassPathXmlApplicationContext(
				"applicationContext.xml");
		SystemContext.getInstance().setApplicationContext(applicationContext);
	}

	@Override
	public void stop(BundleContext context) throws Exception {
		System.out.println("e-his-core stop...");
		SystemContext.getInstance().setApplicationContext(null);
	}
}
